package cn.yanglq.Rss.web.service.impl;

import cn.yanglq.Rss.web.dao.JobSetMapper;
import cn.yanglq.Rss.web.model.JobSet;
import cn.yanglq.Rss.web.model.JobSetExample;
import cn.yanglq.Rss.web.service.JobSetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by yanglq on 2018/1/17.
 */
@Service
public class JobSetServiceImpl implements JobSetService {
    @Autowired
    private JobSetMapper jobSetMapper;

    public List<JobSet> selectjobInfos(String loginid) {
        JobSetExample example = new JobSetExample();
        JobSetExample.Criteria criteria = example.createCriteria();
        criteria.andUseridEqualTo(loginid);
        List<JobSet> list= jobSetMapper.selectByExample(example);
        return list;
    }

    public void deleteJob(Integer id) {
        jobSetMapper.deleteByPrimaryKey(id);
    }

    public void addJobInfo(JobSet jobinfo) {
        jobSetMapper.insert(jobinfo);
    }
}
